home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
c
/
cuj9205.zip
/
1005113A
< prev
next >
Wrap
Text File
|
1992-06-02
|
1KB
|
40 lines
Listing 3
***************
void _far your_error_handler(
unsigned device_error,
unsigned dos_error,
unsigned _far *header
);
main()
{
/* Set up your handler as the handler */
_harderr( your_error_handler);
/* Remainder of your code */
}
void _far your_error_handler(
unsigned device_error, /* Device error code */
unsigned dos_error, /* Dos error code */
unsigned _far *header /* This is the device header */
)
{
/* Test the device error and the dos error, as appropriate */
/* Inside of your routine, you need to call one or more
of the following */
/* To retry */
_hardresume( _HARDERR_RETRY );
/* To abort */
_hardresume( _HARDERR_ABORT );
/* To ignore */
_hardresume(_HARDERR_IGNORE);
/* To return to DOS (continue with program) */
_hardretn( doserr );
}